package ihm.views;

import ihm.controllers.ATKcontroller;
import ihm.models.ATKlistener;

/**
 * This abstract class is used to be sure that the Controller will handle 
 * ATKview and not Swing,AWT,... components. This kind of view implements
 * ATKlistener in order to be able to add a view to the model listenerlist.
 * @author Baptiste Legrand & Benjamin Orman
 * @version 1.0
 */
public abstract class ATKview implements ATKlistener{
  //The controller associate to the view
  private ATKcontroller controller;
  
  /**
   * Constructor used to create an ATKview. This constructor only set the 
   * controller with the ATKcontroller given in parameter
   * @param newController - The controller which will be used with this view.
   */
  public ATKview(ATKcontroller newController)
  {
    super();
    this.controller = newController;
  }
  
  /**
   * This function returns the controller associate to the view.
   * @return the ATKcontroller associate to the view.
   */
  public ATKcontroller getControler()
  {
    return this.controller;
  }
  
  /**
   * Method uses to display the view.
   */
  public abstract void display();
  /**
   * Method uses to close the view.
   */
  public abstract void close();
}
